.class public Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;
.super Lcom/bitauto/autoeasy/BaseActivity;
.source "EvaluatingDetailActivity.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity$downLoadTask;
    }
.end annotation


# instance fields
.field private final NEWSID:Ljava/lang/String;

.field private news:Lcom/bitauto/autoeasy/news/Object/News;

.field private text01:Landroid/widget/TextView;

.field private text02:Landroid/widget/TextView;

.field private text03:Landroid/widget/TextView;

.field private url:Ljava/lang/String;

.field private webView:Landroid/webkit/WebView;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 21
    invoke-direct {p0}, Lcom/bitauto/autoeasy/BaseActivity;-><init>()V

    .line 23
    const-string v0, "newsid"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->NEWSID:Ljava/lang/String;

    .line 21
    return-void
.end method


# virtual methods
.method public downLoadData()V
    .locals 2

    .prologue
    .line 58
    new-instance v0, Lcom/bitauto/autoeasy/news/Object/NewsContentParser;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->url:Ljava/lang/String;

    invoke-direct {v0, v1}, Lcom/bitauto/autoeasy/news/Object/NewsContentParser;-><init>(Ljava/lang/String;)V

    .line 59
    .local v0, newsContentParser:Lcom/bitauto/autoeasy/news/Object/NewsContentParser;
    invoke-virtual {v0}, Lcom/bitauto/autoeasy/news/Object/NewsContentParser;->Paser2Object()Lcom/bitauto/autoeasy/news/Object/News;

    move-result-object v1

    iput-object v1, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->news:Lcom/bitauto/autoeasy/news/Object/News;

    .line 60
    invoke-super {p0}, Lcom/bitauto/autoeasy/BaseActivity;->downLoadData()V

    .line 61
    return-void
.end method

.method public findView()V
    .locals 3

    .prologue
    .line 46
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "http://m.bitauto.com/appapi//News/Content.ashx?id="

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v2, "newsid"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->url:Ljava/lang/String;

    .line 48
    const v0, 0x7f0b01a7

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->text01:Landroid/widget/TextView;

    .line 49
    const v0, 0x7f0b01a8

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->text02:Landroid/widget/TextView;

    .line 50
    const v0, 0x7f0b01a9

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->text03:Landroid/widget/TextView;

    .line 51
    const v0, 0x7f0b01b7

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/webkit/WebView;

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->webView:Landroid/webkit/WebView;

    .line 54
    return-void
.end method

.method public finish()V
    .locals 1

    .prologue
    .line 111
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->webView:Landroid/webkit/WebView;

    invoke-virtual {v0}, Landroid/webkit/WebView;->clearHistory()V

    .line 112
    invoke-super {p0}, Lcom/bitauto/autoeasy/BaseActivity;->finish()V

    .line 113
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4
    .parameter "savedInstanceState"

    .prologue
    .line 32
    invoke-super {p0, p1}, Lcom/bitauto/autoeasy/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    .line 34
    const v0, 0x7f030025

    invoke-virtual {p0, v0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->setLayout(I)V

    .line 35
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->setTitleContent()V

    .line 37
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->findView()V

    .line 39
    new-instance v0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity$downLoadTask;

    invoke-direct {v0, p0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity$downLoadTask;-><init>(Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;)V

    const/4 v1, 0x1

    new-array v1, v1, [Ljava/lang/String;

    const/4 v2, 0x0

    const-string v3, ""

    aput-object v3, v1, v2

    invoke-virtual {v0, v1}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity$downLoadTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 43
    return-void
.end method

.method public refreshView()V
    .locals 5

    .prologue
    const/4 v4, 0x0

    .line 65
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->text01:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->news:Lcom/bitauto/autoeasy/news/Object/News;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/news/Object/News;->getTitle()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 66
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->text02:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->news:Lcom/bitauto/autoeasy/news/Object/News;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/news/Object/News;->getModifytime()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 67
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->text03:Landroid/widget/TextView;

    iget-object v3, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->news:Lcom/bitauto/autoeasy/news/Object/News;

    invoke-virtual {v3}, Lcom/bitauto/autoeasy/news/Object/News;->getAuthor()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 69
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->webView:Landroid/webkit/WebView;

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v1

    .line 70
    .local v1, ws:Landroid/webkit/WebSettings;
    invoke-virtual {v1, v4}, Landroid/webkit/WebSettings;->setAllowFileAccess(Z)V

    .line 71
    invoke-virtual {v1, v4}, Landroid/webkit/WebSettings;->setJavaScriptEnabled(Z)V

    .line 72
    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Landroid/webkit/WebSettings;->setBuiltInZoomControls(Z)V

    .line 73
    const-string v2, "utf-8"

    invoke-virtual {v1, v2}, Landroid/webkit/WebSettings;->setDefaultTextEncodingName(Ljava/lang/String;)V

    .line 74
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->webView:Landroid/webkit/WebView;

    new-instance v3, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity$1;

    invoke-direct {v3, p0}, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity$1;-><init>(Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;)V

    invoke-virtual {v2, v3}, Landroid/webkit/WebView;->setWebViewClient(Landroid/webkit/WebViewClient;)V

    .line 81
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->news:Lcom/bitauto/autoeasy/news/Object/News;

    invoke-virtual {v2}, Lcom/bitauto/autoeasy/news/Object/News;->getContent()Ljava/lang/String;

    move-result-object v0

    .line 82
    .local v0, content:Ljava/lang/String;
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    if-lez v2, :cond_0

    .line 83
    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/EvaluatingDetailActivity;->webView:Landroid/webkit/WebView;

    const-string v3, "text/html"

    const-string v4, "base64"

    invoke-virtual {v2, v0, v3, v4}, Landroid/webkit/WebView;->loadData(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 85
    :cond_0
    invoke-super {p0}, Lcom/bitauto/autoeasy/BaseActivity;->refreshView()V

    .line 86
    return-void
.end method
